package golo

//#include "dll-test.h"
import "C"
import "errors"

/* 矩形框 */
type Rect struct {
	x, y, width, height int
}

/* 一个识别框 */
type Recognition struct {
	rect       Rect
	confidence float32
	tag_name   string
}

/* 识别结果集 */
type InferResult struct {
	recognition_list []Recognition
	recognition_size int
	file_name        string
}

/* C语言异常到go异常的映射表 */
var InferResultErrMap = map[C.int]error{
	C.OK:            nil,
	C.InputImageErr: errors.New("输入图片异常"),
	C.EngineFileErr: errors.New("engine文件异常"),
	C.InferErr:      errors.New("推理过程发生错误"),
}
